package com.efounder.frame.bean;

/**
 * 主题更换的bean
 *
 * @autor yqs
 * @date 2019/1/29 13:56
 **/
public class MyThemeBean {
    //默认
    public static int TYPE_IN_DEFAULT = 0;
    //应用内换肤
    public static int TYPE_IN_APP = 1;
    //插件式换肤（读取文件）
    public static int TYPE_OUT_APP = 2;
    //主题名称
    private String themeTitle;
    //主题类型
    private int type;
    //主题名称 可能是本地文件名 也可能使res 的名称
    private String themeName;
    //是否选中
    private boolean isSelected;

    private MyThemeBean(Builder builder) {
        setThemeTitle(builder.themeTitle);
        setType(builder.type);
        setThemeName(builder.themeName);
        isSelected = builder.isSelected;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public MyThemeBean setSelected(boolean selected) {
        isSelected = selected;
        return this;
    }

    public String getThemeTitle() {
        return themeTitle;
    }

    public MyThemeBean setThemeTitle(String themeTitle) {
        this.themeTitle = themeTitle;
        return this;
    }

    public int getType() {
        return type;
    }

    public MyThemeBean setType(int type) {
        this.type = type;
        return this;
    }

    public String getThemeName() {
        return themeName;
    }

    public MyThemeBean setThemeName(String themeName) {
        this.themeName = themeName;
        return this;
    }


    public static final class Builder {
        private String themeTitle;
        private int type;
        private String themeName;
        private boolean isSelected;

        public Builder() {
        }

        public Builder themeTitle(String val) {
            themeTitle = val;
            return this;
        }

        public Builder type(int val) {
            type = val;
            return this;
        }

        public Builder themeName(String val) {
            themeName = val;
            return this;
        }

        public Builder isSelected(boolean val) {
            isSelected = val;
            return this;
        }

        public MyThemeBean build() {
            return new MyThemeBean(this);
        }
    }
}
